package HomeWork;

public class Work_2 {
    public static void main(String[] args) {
        Teacher[] teacher=new Teacher[3];
        teacher[0]=new Professor("jack",28,"人机",1);
        teacher[1]=new Professor("nack",45,"人困",1.2);
        teacher[2]=new Professor("dack",26,"人坤",1.3);

        for (int i = 0; i <teacher.length ; i++) {
            teacher[i].introduce();
        }

    }
}

class Teacher{
    private String name;
    private int age;
    private String post;
    private double salary;

    public Teacher(String name, int age, String post, double salary) {
        this.name = name;
        this.age = age;
        this.post = post;
        this.salary = salary;
    }
    public void introduce(){
        System.out.println(name+"\t"+age+"\t"+post+"\t"+salary);
    }
}

class Professor extends Teacher{

    public Professor(String name, int age, String post, double salary) {
        super(name, age, post, salary);
    }
}
class LProfessor extends Teacher{
    public LProfessor(String name, int age, String post, double salary) {
        super(name, age, post, salary);
    }
}
class Talk extends Teacher{
    public Talk(String name, int age, String post, double salary) {
        super(name, age, post, salary);
    }
}